<?php
declare(strict_types=1);
/**
 * Created by project.
 * User: huanzipap
 * Date: 2023/5/11
 * Time: 15:01
 */

namespace App\Model;

use Hyperf\Database\Model\Model;
use Hyperf\Database\Model\SoftDeletes;

class ActPrizeJoin extends Model
{
    use SoftDeletes;
    protected ?string $table='act_prize_join';
    public bool $timestamps = true;

    protected array $fillable = ['party_id','act_id','uid','prize_goods_id','prize_goods_name','status'];


    public function user(): \Hyperf\Database\Model\Relations\belongsTo
    {
        return $this->belongsTo(User::class, 'uid', 'id');
    }


    public function act(): \Hyperf\Database\Model\Relations\belongsTo
    {
        return $this->belongsTo(Act::class, 'act_id', 'id');
    }
}